package com.pdsu.xpf.graduation01.service;

import com.pdsu.xpf.graduation01.domain.Commodity;
import com.pdsu.xpf.graduation01.domain.CommodityType;
import com.pdsu.xpf.graduation01.domain.Type;
import com.pdsu.xpf.graduation01.dto.CommodityLikeDTO;
import com.pdsu.xpf.graduation01.vo.CommodityVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ICommodityService {
    List<Commodity> findAllRecommendCommodity();
    List<Commodity> findAllCommodity();

    Commodity getCommodityByCID(int cid);

    List<Commodity> getCommodityByCTID(int ctid);
    List<CommodityLikeDTO> getLikeCommodity(int uid);

    int addLikeCommodity(int uid,int cid);

    int delLikeCommodity(int uid, int cid);

    Integer commodityIsLike(int uid, int cid);

    Integer carIsHaveCommodity(int uid, int cid);

    Integer addCommodityToCar(int uid, int cid);

    List<Commodity> findCommodityByKey(String key);

    Integer insertACommodity(Commodity commodity);

    List<Type> getAllType();

    List<CommodityType> getCommodityTypeByTID(int tid);
    List<CommodityVO> findAllCommodityVO();

    Integer delCommodityByCID(int cid);

    List<CommodityVO> findAllCheckCommodityVO();

    Integer upCommodityByCID(int cid);

    List<CommodityVO> searchCommodityByKey(String s);

    int getCTIDbyTYPENAME(String typename);

    int updateCommodityByCID(int cid, double price, int ctid);
}
